def calculate_sum(n):
    total = 0
    current_term = 1
    for i in range(n):
        total += current_term
        current_term /= 2
    return total
n = 6
print(calculate_sum(n))